/*
 *------------------------------------------------------------------------------
 * @File      :    ei_mai_acap_define.h
 * @Date      :    2021-4-8
 * @Author    :    lomboswer <lomboswer@lombotech.com>
 * @Brief     :    Media Interface for MADP(Media Development Platform).
 *
 * Copyright (C) 2020-2021, LomboTech Co.Ltd. All rights reserved.
 *------------------------------------------------------------------------------
 */

#ifndef __EI_MAI_ACAP_DEFINE_H__
#define __EI_MAI_ACAP_DEFINE_H__

#include "ei_mai_comm_define.h"

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif

#define EI_ACAP_MAX_NUM 1
#define EI_MADP_ACAP_MIN_GAIN 0
#define EI_MADP_ACAP_MAX_GAIN 100

#ifndef EI_ID_ACAP
#define EI_ID_ACAP EI_ID_AUDIOIN
#endif

typedef struct ei_ID_ACAP_ATTR_S
{
    EI_MADP_AUDIO_SAMPLE_RATE_E  enSampleRate;
    EI_MADP_AUDIO_BITWIDTH_E     enBitwidth;
    EI_MADP_AUDIO_SOUND_MODE_E   enSoundMode;
    EI_MADP_AUDIO_MODE_E enAudioMode;
    EI_U32                  u32PtNumPerFrm;
} EI_MADP_ACAP_ATTR_S;

typedef enum eiEN_ACAP_ERR_CODE_E
{
    MADP_EN_ACAP_INVALID_FD = 0x40,
    MADP_EN_ACAP_IOCTL_FAIL = 0x41,
    MADP_EN_ACAP_OVERRANGE = 0x42,
    MADP_EN_ACAP_NOT_INITED = 0x43,
    MADP_EN_ACAP_NOT_STARTED = 0x44
}EN_ACAP_ERR_CODE_E;

#define EI_ERR_MAI_ACAP_NULL_PTR                   EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_NULL_PTR)

#define EI_ERR_MAI_ACAP_ILLEGAL_PARA               EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_ILLEGAL_PARAM)

#define EI_ERR_MAI_ACAP_INVALID_FD                 EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ACAP_INVALID_FD)

#define EI_ERR_MAI_ACAP_IOCTL_FAIL                 EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ACAP_IOCTL_FAIL)

#define EI_ERR_MAI_ACAP_NOTSUPPORT                 EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_NOT_SUPPORT)

#define EI_ERR_MAI_ACAP_OVERRANGE                  EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ACAP_OVERRANGE)

#define EI_ERR_MAI_ACAP_NOT_INITED                 EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ACAP_NOT_INITED)

#define EI_ERR_MAI_ACAP_NOT_STARTED                EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ACAP_NOT_STARTED)

#define EI_ERR_MAI_ACAP_NOT_PREM                   EI_MADP_DEF_ERR(EI_ID_ACAP,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_NOT_PERM)

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

#endif
